<template>
  <div class="top-opt">
    <div class="top-opt-left" v-if="$slots.left">
      <slot name="left"></slot>
    </div>
    <slot></slot>
    <div class="top-opt-right">
      <slot name="right"></slot>
      <el-button v-if="isBack" type="default" @click="$router.go(-1)">返回</el-button>
    </div>
  </div>
</template>

<script>
import '@/styles/components/top-opt.scss';

export default {
  props: {
    isBack: {
      type: Boolean,
      default: true
    }
  }
}
</script>